
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>
   <TITLE>pcpool_c</TITLE>
</HEAD>

<BODY style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<A name="TOP"></A>

<table style="text-align: left; margin-left: auto; margin-right: auto; width: 800px;"
 border="0" cellpadding="5" cellspacing="2">
  <tbody>
    <tr>
      <td style="background-color: rgb(153, 153, 153); vertical-align: middle; text-align: center;">
      <div align="right"> 
      <small><small><a href="index.html">Index Page</a></small></small>
      </div>
      <b>pcpool_c</b> </td>
    </tr>

    <tr>
      <td style="vertical-align: top;">

<small><div align="center">
<A HREF="index.html#A">A</A>&nbsp;
<A HREF="index.html#B">B</A>&nbsp;
<A HREF="index.html#C">C</A>&nbsp;
<A HREF="index.html#D">D</A>&nbsp;
<A HREF="index.html#E">E</A>&nbsp;
<A HREF="index.html#F">F</A>&nbsp;
<A HREF="index.html#G">G</A>&nbsp;
<A HREF="index.html#H">H</A>&nbsp;
<A HREF="index.html#I">I</A>&nbsp;
<A HREF="index.html#J">J</A>&nbsp;
<A HREF="index.html#K">K</A>&nbsp;
<A HREF="index.html#L">L</A>&nbsp;
<A HREF="index.html#M">M</A>&nbsp;
<A HREF="index.html#N">N</A>&nbsp;
<A HREF="index.html#O">O</A>&nbsp;
<A HREF="index.html#P">P</A>&nbsp;
<A HREF="index.html#Q">Q</A>&nbsp;
<A HREF="index.html#R">R</A>&nbsp;
<A HREF="index.html#S">S</A>&nbsp;
<A HREF="index.html#T">T</A>&nbsp;
<A HREF="index.html#U">U</A>&nbsp;
<A HREF="index.html#V">V</A>&nbsp;
<A HREF="index.html#W">W</A>&nbsp;
<A HREF="index.html#X">X</A>&nbsp;
</div></small>
       <br>
       <table style="text-align: left; width: 60%; margin-left: auto; margin-right: auto;"
       border="0" cellspacing="2" cellpadding="2">
        <tbody>
          <tr>
            <td style="width: 50%; text-align: center;">
            <small>
              <a href="#Procedure">Procedure<br></a>
              <a href="#Abstract">Abstract<br></a>
              <a href="#Required_Reading">Required_Reading<br></a>
              <a href="#Keywords">Keywords<br></a>
              <a href="#Brief_I/O">Brief_I/O<br></a>
              <a href="#Detailed_Input">Detailed_Input<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Detailed_Output">Detailed_Output<br></a>
              <a href="#Parameters">Parameters<br></a>
              <a href="#Exceptions">Exceptions<br></a>
              <a href="#Files">Files<br></a>
              <a href="#Particulars">Particulars<br></a>
              <a href="#Examples">Examples<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Restrictions">Restrictions<br></a>
              <a href="#Literature_References">Literature_References<br></a>
              <a href="#Author_and_Institution">Author_and_Institution<br></a>
              <a href="#Version">Version<br></a>
              <a href="#Index_Entries">Index_Entries<br></a>
             </small>
            </td>
          </tr>
        </tbody>
</table>

<h4><a name="Procedure">Procedure</a></h4>
<PRE>
   void pcpool_c ( ConstSpiceChar  * name,
                   SpiceInt          n,
                   SpiceInt          lenvals,
                   const void      * cvals    ) 
</PRE>
<h4><a name="Abstract">Abstract</a></h4>
<PRE>
 
   This entry point provides toolkit programmers a method for 
   programmatically inserting character data into the 
   kernel pool. 
 </PRE>
<h4><a name="Required_Reading">Required_Reading</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Keywords">Keywords</a></h4>
<PRE>
 
   POOL 
 

</PRE>
<h4><a name="Brief_I/O">Brief_I/O</a></h4>
<PRE>
 
   VARIABLE  I/O  DESCRIPTION 
   --------  ---  -------------------------------------------------- 
   name       I   The kernel pool name to associate with cvals. 
   n          I   The number of values to insert. 
   lenvals    I   The lengths of the strings in the array cvals.
   cvals      I   An array of strings to insert into the kernel pool. 
 </PRE>
<h4><a name="Detailed_Input">Detailed_Input</a></h4>
<PRE>
 
   name       is the name of the kernel pool variable to associate 
              with the values supplied in the array cvals. 'name' is
              restricted to a length of 32 characters or less. 
 
   n          is the number of values to insert into the kernel pool. 
 
   lenvals    is the length of the strings in the array cvals, 
              including the null terminators.  
              
   cvals      is an array of strings to insert into the kernel 
              pool.  cvals should be declared as follows:
              
                 char  cvals[n][lenvals];
 </PRE>
<h4><a name="Detailed_Output">Detailed_Output</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Parameters">Parameters</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Exceptions">Exceptions</a></h4>
<PRE>
 
   1) If name is already present in the kernel pool and there 
      is sufficient room to hold all values supplied in values, 
      the old values associated with name will be overwritten. 
 
   2) If there is not sufficient room to insert a new variable 
      into the kernel pool and name is not already present in 
      the kernel pool, the error SPICE(KERNELPOOLFULL) is 
      signaled by a routine in the call tree to this routine. 
 
   3) If there is not sufficient room to insert the values associated 
      with name, the error SPICE(NOMOREROOM) will be signaled. 
 
   4) If either input string pointer is null, the error
      SPICE(NULLPOINTER) will be signaled.
 
   5) If the input string name has length zero, the error
      SPICE(EMPTYSTRING) will be signaled.
 
   6) If the input cvals string length is less than 2, the error
      SPICE(STRINGTOOSHORT) will be signaled.

   7) The error 'SPICE(BADVARNAME)' signals if the kernel pool
      variable name length exceeds 32.
</PRE>
<h4><a name="Files">Files</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Particulars">Particulars</a></h4>
<PRE>
 
   This entry point provides a programmatic interface for inserting 
   character data into the SPICE kernel pool without reading an 
   external file. 
 </PRE>
<h4><a name="Examples">Examples</a></h4>
<PRE>
 
   The following example program shows how a topocentric frame for a
   point on the surface of the earth may be defined at run time using
   <b>pcpool_c</b>, <a href="pdpool_c.html">pdpool_c</a>, and <a href="pipool_c.html">pipool_c</a>.  In this example, the surface
   point is associated with the body code 300000.  To facilitate
   testing, the location of the surface point coincides with that of
   the DSN station DSS-12; the reference frame MYTOPO defined here
   coincides with the reference frame DSS-12_TOPO.
 
      #include &lt;stdio.h&gt;
      #include &quot;SpiceUsr.h&quot;

      int main()
      {
         /.
         The first angle is the negative of the longitude of the
         surface point; the second angle is the negative of the 
         point's colatitude.
         ./
         SpiceDouble             angles [3]      =  { -243.1945102442646,
                                                       -54.7000629043147,
                                                       180.0              };

         SpiceDouble             et              =    0.0;
         SpiceDouble             rmat   [3][3];

         SpiceInt                axes   [3]      =  { 3, 2, 3 };
         SpiceInt                center          =    300000;
         SpiceInt                frclass         =    4;
         SpiceInt                frclsid         =    1500000;
         SpiceInt                frcode          =    1500000;

         /.
         Define the MYTOPO reference frame. 

         Note that the third argument in the <b>pcpool_c</b> calls is
         the length of the final string argument, including the
         terminating null character.
         ./
         <a href="pipool_c.html">pipool_c</a> ( &quot;FRAME_MYTOPO&quot;,            1,     &amp;frcode   );
         <b>pcpool_c</b> ( &quot;FRAME_1500000_NAME&quot;,      1, 7,  &quot;MYTOPO&quot;  );
         <a href="pipool_c.html">pipool_c</a> ( &quot;FRAME_1500000_CLASS&quot;,     1,     &amp;frclass  );
         <a href="pipool_c.html">pipool_c</a> ( &quot;FRAME_1500000_CLASS_ID&quot;,  1,     &amp;frclsid  );
         <a href="pipool_c.html">pipool_c</a> ( &quot;FRAME_1500000_CENTER&quot;,    1,     &amp;center   );

         <b>pcpool_c</b> ( &quot;OBJECT_300000_FRAME&quot;,     1, 7,  &quot;MYTOPO&quot;  );

         <b>pcpool_c</b> ( &quot;TKFRAME_MYTOPO_RELATIVE&quot;, 1, 7,  &quot;ITRF93&quot;  );
         <b>pcpool_c</b> ( &quot;TKFRAME_MYTOPO_SPEC&quot;,     1, 7,  &quot;ANGLES&quot;  );
         <b>pcpool_c</b> ( &quot;TKFRAME_MYTOPO_UNITS&quot;,    1, 8,  &quot;DEGREES&quot; );
         <a href="pipool_c.html">pipool_c</a> ( &quot;TKFRAME_MYTOPO_AXES&quot;,     3,     axes      );
         <a href="pdpool_c.html">pdpool_c</a> ( &quot;TKFRAME_MYTOPO_ANGLES&quot;,   3,     angles    );

         /.
         Load a high precision binary earth PCK. Also load a
         topocentric frame kernel for DSN stations. The file names
         shown here are simply examples; users should replace these
         with the names of appropriate kernels.
         ./
         <a href="furnsh_c.html">furnsh_c</a> ( &quot;earth_000101_060207_051116.bpc&quot; );
         <a href="furnsh_c.html">furnsh_c</a> ( &quot;earth_topo_050714.tf&quot;           );

         /.
         Look up transformation from DSS-12_TOPO frame to MYTOPO frame.
         This transformation should differ by round-off error from
         the identity matrix. 
         ./
         <a href="pxform_c.html">pxform_c</a> ( &quot;DSS-12_TOPO&quot;, &quot;MYTOPO&quot;, et, rmat );

         printf   ( &quot;\n&quot;
                    &quot;DSS-12_TOPO to MYTOPO transformation at &quot;
                    &quot;et %23.16e = \n&quot;
                    &quot;\n&quot;
                    &quot;    %25.16f  %25.16f  %25.16f\n&quot;
                    &quot;    %25.16f  %25.16f  %25.16f\n&quot;
                    &quot;    %25.16f  %25.16f  %25.16f\n&quot;,
                    et,
                    rmat[0][0],  rmat[0][1],  rmat[0][2],
                    rmat[1][0],  rmat[1][1],  rmat[1][2],
                    rmat[2][0],  rmat[2][1],  rmat[2][2]       );

         return ( 0 );
      }

 </PRE>
<h4><a name="Restrictions">Restrictions</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Literature_References">Literature_References</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Author_and_Institution">Author_and_Institution</a></h4>
<PRE>
 
   N.J. Bachman    (JPL)
   W.L. Taber      (JPL) 
 </PRE>
<h4><a name="Version">Version</a></h4>
<PRE>
   -CSPICE Version 1.3.2,  10-FEB-2010 (EDW)

      Added mention of the restriction on kernel pool variable 
      names to 32 characters or less.

      Reordered header sections to conform to SPICE convention.

   -CSPICE Version 1.3.1, 17-NOV-2005 (NJB)

      Replaced code fragment in Examples section of header with 
      smaller, complete program. 

   -CSPICE Version 1.3.0, 12-JUL-2002 (NJB)

      Call to C2F_CreateStrArr_Sig replaced with call to C2F_MapStrArr.

   -CSPICE Version 1.2.0, 28-AUG-2001 (NJB)

      Const-qualified input array cvals.

   -CSPICE Version 1.1.0, 14-FEB-2000 (NJB)

       Calls to C2F_CreateStrArr replaced with calls to error-signaling 
       version of this routine:  C2F_CreateStrArr_Sig.
      
   -CSPICE Version 1.0.0, 18-JUN-1999 (NJB) (WLT)
</PRE>
<h4><a name="Index_Entries">Index_Entries</a></h4>
<PRE>
 
   Set the value of a character kernel pool variable 
 </PRE>
<h4>Link to routine pcpool_c source file <a href='../../../src/cspice/pcpool_c.c'>pcpool_c.c</a> </h4>

      </td>
    </tr>
  </tbody>
</table>

   <pre>Wed Jun  9 13:05:27 2010</pre>

</body>
</html>

